package com.dk.code;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author zh
 * @Description TODO
 * @createTime 2023/4/20
 */
@Slf4j
@Component
@CodeType(codeType = "NOWDATE")
public class NOWDATE implements CodeService {

    @Override
    public String code(String partType, Long ruleId) {
        Date date = new Date();
        SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd");
        log.info(sdf.format(date));
        return sdf.format(date);
    }
}
